/**
 * 2012-7-8
 * jqsl2012@163.com
 */
package net.jeeshop.web.controller.manage.indexImg;

import net.jeeshop.core.Services;
import net.jeeshop.core.common.dao.page.PagerModel;
import net.jeeshop.services.manage.indexImg.IndexImgService;
import net.jeeshop.services.manage.indexImg.bean.IndexImg;
import net.jeeshop.web.controller.BaseController;
import net.jeeshop.web.util.RequestHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;

/**
 * 滚动图片
 * 
 * @author huangf
 * @author jeeshopfans
 * 
 */
@Controller
@RequestMapping("/manage/indexImg/")
public class IndexImgAction extends BaseController<IndexImg> {
	private static final String page_toList = "/manage/indexImg/indexImgList";
	private IndexImgAction() {
		super.page_toList = page_toList;
	}
	@Autowired
	private IndexImgService imgService;

	@Override
	public Services<IndexImg> getService() {
		return imgService;
	}

	@Override
	public void insertAfter(IndexImg e) {
		e.clear();
	}

	@Override
	protected void selectListAfter(PagerModel pager) {
		pager.setPagerUrl("selectList");
	}

	
	/**
	 * 同步缓存
	 * @return
	 * @throws Exception 
	 */
	@RequestMapping("syncCache")
	public String syncCache(HttpServletRequest request, IndexImg img) throws Exception{
		return super.selectList(request, img);
	}
}
